from tornado.wsgi import WSGIContainer
from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLoop
from sched_web import app
import sys

port = int(sys.argv[1]) if sys.argv[1:] else 9876
http_server = HTTPServer(WSGIContainer(app))
http_server.listen(port)
IOLoop.instance().start()

